From: Florian Müllner Date: Tue, 1 Jun 2010 18:03:45 +0000 (+0200) Subject: altTab: Add shortcut to quit application X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~994^2^2~50 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a3918d8c3828fc717c95a2aa6122b9b19a3ba514;p=gnome-shell.git altTab: Add shortcut to quit application Allow to quit the currently selected application by hitting Alt-q, similar to the OS X switcher. https://bugzilla.gnome.org/show_bug.cgi?id=620106 --- diff --git a/js/ui/altTab.js b/js/ui/altTab.js index a10e1433e..80039cba5 100644 --- a/js/ui/altTab.js +++ b/js/ui/altTab.js @@ -156,6 +156,14 @@ var AppSwitcherPopup = new Lang.Class({ this._items[this._selectedIndex].cachedWindows.length); }, + _quitApplication: function(appIndex) { + let appIcon = this._items[appIndex]; + if (!appIcon) + return; + + appIcon.app.request_quit(); + }, + _keyPressHandler: function(keysym, action) { if (action == Meta.KeyBindingAction.SWITCH_GROUP) { if (!this._thumbnailsFocused) @@ -168,6 +176,8 @@ var AppSwitcherPopup = new Lang.Class({ this._select(this._next()); } else if (action == Meta.KeyBindingAction.SWITCH_APPLICATIONS_BACKWARD) { this._select(this._previous()); + } else if (keysym == Clutter.q) { + this._quitApplication(this._selectedIndex); } else if (this._thumbnailsFocused) { if (keysym == Clutter.Left) this._select(this._selectedIndex, this._previousWindow());